package com.jl.jlapp.popu;

import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.support.v4.content.ContextCompat;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnTouchListener;
import android.widget.Button;
import android.widget.PopupWindow;

import com.jl.jlapp.R;

public class PhotoPicPopupWindow extends PopupWindow {
    Button photoButton;
    Button photographButton;
    Button remove;
    View view;

    public PhotoPicPopupWindow(Context paramContext, OnClickListener paramOnClickListener) {
        super(paramContext);
        this.view = ((LayoutInflater) paramContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.photo_main_pop, null);
        this.photographButton = ((Button) this.view.findViewById(R.id.photographButton));
        this.photoButton = ((Button) this.view.findViewById(R.id.photoButton));
        this.remove = ((Button) this.view.findViewById(R.id.remove));
        this.photographButton.setOnClickListener(paramOnClickListener);
        this.photoButton.setOnClickListener(paramOnClickListener);
        this.remove.setOnClickListener(new OnClickListener() {
            public void onClick(View paramAnonymousView) {
                PhotoPicPopupWindow.this.dismiss();
            }
        });
        setContentView(this.view);
        setWidth(-1);
        setHeight(-1);
        setFocusable(true);
        setAnimationStyle(R.style.AnimBottom);
        setBackgroundDrawable(new ColorDrawable(ContextCompat.getColor(paramContext,R.color.white)));
        this.view.setOnTouchListener(new OnTouchListener() {
            public boolean onTouch(View paramAnonymousView, MotionEvent paramAnonymousMotionEvent) {
                PhotoPicPopupWindow.this.view.findViewById(R.id.layout).getTop();
                int i = (int) paramAnonymousMotionEvent.getY();
                if (paramAnonymousMotionEvent.getAction() == 1) {
                    PhotoPicPopupWindow.this.dismiss();
                }
                return true;
            }
        });
    }
}


/* Location:              /Users/davidzhang/Documents/decompileApk/jlfood-dex2jar.jar!/com/jl/jlapp/popu/PhotoPicPopupWindow.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */